package com.sgb.kjwl.api.service;

import com.sgb.kjwl.model.entity.enterprise.AttentionEntity;
import com.sgb.kjwl.model.entity.enterprise.BaseServiceDeatilEntity;
import com.sgb.kjwl.model.entity.enterprise.CopyrightListEntity2;
import com.sgb.kjwl.model.entity.enterprise.EpQuoteEntity;
import com.sgb.kjwl.model.entity.enterprise.IntellpropEntity;
import com.sgb.kjwl.model.entity.enterprise.IpPickSelectEntity;
import com.sgb.kjwl.model.entity.enterprise.PatentDetailEntity;
import com.sgb.kjwl.model.entity.enterprise.ServiceNodeListEntity;
import com.sgb.kjwl.model.entity.enterprise.ServiceSecondClassEntiy;
import com.sgb.kjwl.model.entity.enterprise.TrademarkEntity;
import com.swgk.core.base.model.entity.BaseEntity;
import com.swgk.core.base.model.entity.ContactsEntitiy;
import com.swgk.core.base.model.entity.InvoicingInfoEntity;
import com.swgk.core.base.model.entity.ListResponse;

import java.util.List;
import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Query;
import retrofit2.http.Url;

public interface EnterPriseNewApi {
    /**
     * 企业服务 快速发布
     *
     * @param map
     * @return
     */
    @POST("v1/app/enterpriseServices/homePageConfiguation/issueDemand")
    Call<BaseEntity> publishDemandFun(@Body Map map);

    /**
     * 获取二三级分类
     *
     * @param serviceClass 一级分类id
     * @return
     */
    @POST("v1/app/enterpriseServices/homePageConfiguation/app/getTwoAndThreeService")
    Call<BaseEntity<List<ServiceSecondClassEntiy>>> getservicecategorySecond(@Query("firstId") String serviceClass);

    /**
     * 服务节点列表
     *
     * @param limit
     * @param pageSize
     * @param serviceId
     * @return
     */
    @GET("serviceProcess/list")
    Call<BaseEntity<ListResponse<List<ServiceNodeListEntity>>>> getServiceNodeList(@Query("limit") int limit, @Query("pageSize") int pageSize, @Query("serviceId") String serviceId);

    /**
     * 前台-服务详情
     *
     * @param id
     * @return
     */
    @POST("v1/app/enterpriseServices/serviceHall/getserviceDetails")
    Call<BaseEntity<EpQuoteEntity>> getOfferDetail(@Query("id") long id);


    /**
     * 个人中心-发布服务详情
     *
     * @param id
     * @return
     */
    @POST("v1/app/enterpriseServices/serviceHall/serviceHallDetail")
    Call<BaseEntity<BaseServiceDeatilEntity<EpQuoteEntity>>> serviceHallDetail(@Query("id") long id);


    /**
     * 新增服务
     */
    @POST("v1/app/enterpriseServices/serviceHall/save")
    Call<BaseEntity<String>> saveService(@Body Map<String, Object> map);

    /**
     * 编辑服务
     */
    @POST("v1/app/enterpriseServices/serviceHall/update")
    Call<BaseEntity> updateService(@Body Map<String, Object> map);

    /**
     * 增加服务节点
     */
    @POST("serviceProcess/save")
    Call<BaseEntity> saveServiceNode(@Body Map<String,Object> map);
    /**
     * 修改服务节点
     */
    @PUT("serviceProcess/update")
    Call<BaseEntity>uodateServiceNode(@Body  Map<String,Object> map);
    /**
     * 删除服务节点
     */

    @DELETE()
    Call<BaseEntity> deleteServiceNode(@Url String id );


    /**
     * 获取服务列表
     */
    @POST("v1/app/enterpriseServices/serviceHall/getServiceHallList")
    Call<BaseEntity<ListResponse<List<EpQuoteEntity>>>> getOfferList(@Body Map map);


    /**
     * 价格列表
     */
    @GET("v1/app/enterpriseServices/price/listPrice")
    Call<BaseEntity<List<IpPickSelectEntity>>> getPriceOption(@Query("priceServiceNo") int priceServiceNo);

    //服务推荐列表
    @POST("v1/app/enterpriseServices/serviceHall/recommendList")
    Call<BaseEntity<ListResponse<List<EpQuoteEntity>>>> getRecommendlistdata(@Query("serviceClass") String id, @Query("page") int page, @Query("limit") int limit, @Query("id") String serid);


    /**
     * 获取当前服务是否关注
     */
    @GET("v1/app/enterpriseServices/serviceHall/getAttentionInfoByData")
    Call<BaseEntity<List<AttentionEntity>>> getPriceOption(@Query("userNo") String userNo, @Query("type") String type, @Query("dataId") String dataId);

    /**
     * 关注服务
     * @param map
     * @return
     */
    @POST("v1/app/enterpriseServices/serviceHall/saveAttention")
    Call<BaseEntity<String>> saveAttention(@Body Map<String, Object> map);


    /**********************************商标，版权接口替换**********************************************/
    //知产-商标列表查询，首页推商标,知产交易列表，个人网站企业服务列表，首页搜索
    @POST("v1/app/enterpriseServices/trademark/pageList")
    Call<BaseEntity<ListResponse<List<IntellpropEntity>>>> trademarkLists(@Body Map map);

    //知产-商标筛选获取字符长度选项
    @GET("v1/app/enterpriseServices/trademark/getStrLengthOption")
    Call<BaseEntity<List<IpPickSelectEntity>>> getStrLengthOption();

    //知产-商标筛选获取价格选项
    @GET("v1/app/enterpriseServices/assets/getPriceOption")
    Call<BaseEntity<List<IpPickSelectEntity>>> getPropertyPriceOption();


    //知产-商标详情
    @GET("v1/app/enterpriseServices/trademark/queryDetail")
    Call<BaseEntity<TrademarkEntity>> queryTrademarkDetail(@Query("id") long id);


    //转让-版权列表 ，首页推版权,知产交易列表，个人网站企业服务列表，首页搜索
    @POST("v1/app/enterpriseServices/copyright/pageList")
    Call<BaseEntity<ListResponse<List<CopyrightListEntity2>>>> getCopyrightQueryList(@Body Map map);



    /*****************************************************************************************专利*************************************************************************************************/
    /**
     * 知产交易 专利详情
     * @param id
     * @return
     */
    @GET("v1/app/enterpriseServices/patent/detail")
    Call<BaseEntity<PatentDetailEntity>> queryPatentDetail(@Query("id") long id);


    /********************************************************知产订单**************************************************************************************/
    //创建知产订单-获取企业默认开票信息
    @GET("v1/app/enterpriseServices/order/getInvoicingInfo")
    Call<BaseEntity<ListResponse<List<InvoicingInfoEntity>>>> getVerificationCode_company(@Query("pageSize") int page, @Query("limit") int lomit);

    /**
     * 发票信息，个人、团队信息
     */
    @GET("v1/app/enterpriseServices/order/indByCompanyName")
    Call<BaseEntity<ListResponse<List<InvoicingInfoEntity>>>> getVerificationCode_team(@Query("pageSize") int page, @Query("limit") int lomit);

    //创建知产订单-判断是否可以创建订单
    @POST("v1/app/enterpriseServices/order/goQuotation")
    Call<BaseEntity> getMakeOverType(@Query("orderType") int orderType,@Query("id") String id,@Query("no") String no,@Query("type") int type);

    //创建知产订单-提交订单
    @POST("v1/app/enterpriseServices/order/orderAdd")
    Call<BaseEntity<Object>> submitMakeOverOreder(@Body Map map);


    /**
     * 联系人列表
     */
    @GET("v1/app/enterpriseServices/order/orderContactList")
    Call<BaseEntity<ListResponse<List<ContactsEntitiy>>>> getContaactList(@Query("pageSize") int pagesize, @Query("limit") int limit, @Query("publishType") int publishType, @Query("userNo") String userNo, @Query("companyNo") String companyNo, @Query("teamNo") String teamNo);

    /**
     * 新增编辑联系人
     */
    @POST("v1/app/enterpriseServices/order/saveOrUpdate")
    Call<BaseEntity> saveOrUpdate(@Body ContactsEntitiy contactsEntitiy);

    /**
     * 删除联系人
     */
    @DELETE
    Call<BaseEntity> delcontact(@Url String url);

}
